package org.anderground.app.storage.xml;

import java.io.File;
import java.io.InputStream;

import org.anderground.app.storage.ConfigData;
import org.anderground.app.storage.ConfigReader;
import org.anderground.app.storage.OnProgressCallback;
import org.anderground.modules.storage.AbstractStreamReader;

/**
 * @author Eldar Abusalimov (eldar.abusalimov@gmail.com)
 */
public abstract class XmlConfigReader extends AbstractStreamReader<ConfigData>
		implements ConfigReader {

	private OnProgressCallback callback;

	/**
	 * @param file
	 * @param callback
	 */
	public XmlConfigReader(File file, OnProgressCallback callback) {
		super(file);
		this.callback = callback;
	}

	/**
	 * @param inputStream
	 * @param closeAfterRead
	 * @param callback
	 */
	public XmlConfigReader(InputStream inputStream, boolean closeAfterRead,
			OnProgressCallback callback) {
		super(inputStream, closeAfterRead);
		this.callback = callback;
	}

	/**
	 * @return the callback
	 */
	protected final OnProgressCallback getOnProgressCallback() {
		return callback;
	}

}